package com.jishuo.nontax.bean.vo;

import com.jishuo.base.util.StringObject;
import com.jishuo.base.util.StringUtil;
import com.jishuo.nontax.bean.bank.Waitaffirm;
import com.jishuo.nontax.bean.message.*;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 银行上传待查表
 *
 * @author hlp
 * @email 1459875748@qq.com
 * @date 2023-02-02 10:13:13
 */
@Data
public class WaitaffirmVO implements Serializable {
    private static final long serialVersionUID = 1L;

    //流水号
    private Long waitaffirmid;
    //行政区划
    private Long cantonid;
    //缴款人
    private String payer;
    //缴款人账号
    private String payeraccount;
    //缴款人开户银行
    private String payerbank;
    //收款帐户ID
    private Long bankid;
    //银行交易流水号
    private String bankaffirm;
    //附言
    private String postscript;
    //银行收款时间
    private String paybankdt;
    //银行网点
    private String bankstation;
    //金额
    private BigDecimal originfund;
    //缴款方式
    private int payway;
    //
    private Integer issend;
    //
    private Long messageid;
    //
    private String writedate;
    //1可用,0不可用,3已用
    private int billstate;
    //发送时间
    private String sendtime;
    //
    private Integer isbankaffirm;
    //银行核心交易流水号
    private String hxbankaffirm;
    //确认票号
    private String eticketnum;

    private String bankstationname;
//    private String paywayid;
    private String bankname;
    private String cantoncode;
    private String cantonname;
    private String accountcode;
    private String paywaycode;
    private String waitaffirmids;
    private String payeeaccountcode;
    private String payeebankname;
    private String payeeaccountname;

    public RegetWaitaffirm getRegetWaitaffirm(){
        RegetWaitaffirm bean = new RegetWaitaffirm();

        bean.setBankaccount(this.accountcode);
        bean.setBankaffirm(this.bankaffirm);
        bean.setBankid(StringObject.objectString(this.bankid));
        bean.setPaybankdt(this.paybankdt);

        return bean;
    }

    public WaitaffirmVO setWaitaffirmVO(SendRegetWaitaffirmDTO dto){
        WaitaffirmVO bean = new WaitaffirmVO();
        this.bankaffirm = dto.getBankaffirm();
        this.bankid=Long.valueOf(dto.getBankid());
        this.cantonid = Long.valueOf(dto.getCantonid());
        this.waitaffirmid=Long.valueOf(dto.getWaitaffirmid());
        this.payer=dto.getPayer();
        this.paybankdt= dto.getPaybankdt();
        this.payeraccount = dto.getPayeraccount();
        this.postscript=dto.getPostscript();
        this.payerbank=dto.getPayerbank();
        return bean;
    }

    public WaitaffirmVO setNewWaitaffirmVO(SendRegetNewWaitaffirmDTO dto){
        WaitaffirmVO bean = new WaitaffirmVO();
        this.bankaffirm = dto.getBankaffirm();
        this.bankid=Long.valueOf(dto.getBankid());
        this.cantonid = Long.valueOf(dto.getCantonid());
//        this.waitaffirmid=Long.valueOf(dto.getWaitaffirmid());
        this.payer=dto.getPayer();
        this.paybankdt= dto.getPaybankdt();
        this.payeraccount = dto.getPayeraccount();
        this.postscript=dto.getPostscript();
        this.payerbank=dto.getPayerbank();
        this.eticketnum=dto.getEticketnum();
        return bean;
    }

    public Waitaffirm getWaitaffirm(){
        Waitaffirm bean = new Waitaffirm();
        bean.setBankaffirm(this.bankaffirm);
        bean.setBankid(StringObject.objectString(this.bankid));
        bean.setBillstate(StringObject.objectString(this.billstate));
        bean.setBankname(this.bankname);
        bean.setCantoncode(this.cantoncode);
        bean.setCantonname(this.cantonname);
        bean.setCantonid(StringObject.objectString(this.cantonid));
        bean.setEticketnum(this.eticketnum);
        bean.setOriginfund(StringObject.objectString(this.originfund));
        bean.setPaybankdt(this.paybankdt);
        bean.setPayer(this.payer);
        bean.setPayeraccount(this.payeraccount);
        bean.setPayerbank(this.payerbank);
        bean.setPostscript(this.postscript);
        bean.setWaitaffirmid(StringObject.objectString(this.waitaffirmid));

        return bean;
    }

    public SetWaitaffirmDTO getSetWaitaffirmDTO(){
        SetWaitaffirmDTO bean = new SetWaitaffirmDTO();
        bean.setBankaffirm(this.bankaffirm);
        bean.setBankid(StringObject.objectString(this.bankid));
        bean.setBankstation(this.bankstation);
        bean.setCantonid(StringObject.objectString(this.cantonid));
        bean.setOriginfund(StringObject.objectString(this.originfund));
        bean.setPaybankdt(this.paybankdt);
        bean.setPayer(this.payer);
        bean.setPayeraccount(this.payeraccount);
        bean.setPayerbank(this.payerbank);
        bean.setPaywayid(StringUtil.toStr(this.payway));
        bean.setPostscript(this.postscript);
        return bean;
    }

    public ResetWaitaffirmInfo getResetWaitaffirmInfo(){
        ResetWaitaffirmInfo bean = new ResetWaitaffirmInfo();
        bean.setWaitaffirmid("0");
        bean.setCantonid(StringObject.objectString(this.cantonid));
        bean.setBankid(StringObject.objectString(this.bankid));
        bean.setBankaccount(this.accountcode);
        bean.setPaybankdt(this.paybankdt);
        bean.setPostscript(this.postscript);
        bean.setPayer(this.payer);
        bean.setPayeraccount(this.payeraccount);
        bean.setPayerbank(this.payerbank);
        bean.setBankaffirm(this.bankaffirm);
        return bean;
    }


}
